package com.xpffly.design.state;

import com.xpffly.design.state.service.Context;
import com.xpffly.design.state.service.impl.State1;

/**
 * @Author: 午夜学徒
 * @Date: 2022/4/5 22:35
 * @Description：
 */
public class Scene {
    public static void main(String[] args) {
        // 定义环境角色
        Context context = new Context();
        // 初始化状态
        context.setCurState(new State1());
        // 行为执行
        context.handle1();
        context.handle2();
    }
}
